﻿using System;

namespace Mono.Cecil
{
	// Token: 0x0200006A RID: 106
	public class FieldReference : MemberReference
	{
		// Token: 0x170000B2 RID: 178
		// (get) Token: 0x0600044A RID: 1098 RVA: 0x0001BF68 File Offset: 0x0001A168
		// (set) Token: 0x0600044B RID: 1099 RVA: 0x00003ACE File Offset: 0x00001CCE
		public TypeReference FieldType
		{
			get
			{
				return this.field_type;
			}
			set
			{
				this.field_type = value;
			}
		}

		// Token: 0x170000B3 RID: 179
		// (get) Token: 0x0600044C RID: 1100 RVA: 0x0001BF80 File Offset: 0x0001A180
		public override string FullName
		{
			get
			{
				return this.field_type.FullName + " " + base.MemberFullName();
			}
		}

		// Token: 0x170000B4 RID: 180
		// (get) Token: 0x0600044D RID: 1101 RVA: 0x0001BFB0 File Offset: 0x0001A1B0
		public override bool ContainsGenericParameter
		{
			get
			{
				return this.field_type.ContainsGenericParameter || base.ContainsGenericParameter;
			}
		}

		// Token: 0x0600044E RID: 1102 RVA: 0x00003AD8 File Offset: 0x00001CD8
		internal FieldReference()
		{
			this.token = new MetadataToken(TokenType.MemberRef);
		}

		// Token: 0x0600044F RID: 1103 RVA: 0x00003AF2 File Offset: 0x00001CF2
		public FieldReference(string name, TypeReference fieldType) : base(name)
		{
			Mixin.CheckType(fieldType, Mixin.Argument.fieldType);
			this.field_type = fieldType;
			this.token = new MetadataToken(TokenType.MemberRef);
		}

		// Token: 0x06000450 RID: 1104 RVA: 0x00003B1D File Offset: 0x00001D1D
		public FieldReference(string name, TypeReference fieldType, TypeReference declaringType) : this(name, fieldType)
		{
			Mixin.CheckType(declaringType, Mixin.Argument.declaringType);
			this.DeclaringType = declaringType;
		}

		// Token: 0x06000451 RID: 1105 RVA: 0x0001BFD8 File Offset: 0x0001A1D8
		protected override IMemberDefinition ResolveDefinition()
		{
			return this.Resolve();
		}

		// Token: 0x06000452 RID: 1106 RVA: 0x0001BFF0 File Offset: 0x0001A1F0
		public new virtual FieldDefinition Resolve()
		{
			ModuleDefinition module = this.Module;
			bool flag = module == null;
			if (flag)
			{
				throw new NotSupportedException();
			}
			return module.Resolve(this);
		}

		// Token: 0x0400011C RID: 284
		private TypeReference field_type;
	}
}
